package org.csu.small.controller.front;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.csu.small.common.Constant;
import org.csu.small.common.UniformResponse;
import org.csu.small.entity.Slide;
import org.csu.small.service.ISlideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @author Rambo
 * @date 2020-06-08 9:02
 */
@Controller
@RequestMapping("/slides/")
@Api(value = "API - SlideController", description = "轮播图模块接口详情")
public class SlideController {

    @Autowired
    private ISlideService slideService;

    @GetMapping("/")
    @ResponseBody
    @ApiOperation(value = "查询所有轮播图")
    public UniformResponse<List<Slide>>  slides(){
        return slideService.queryAll(Constant.Slide.SHOW);
    }

}
